<?php
	header("Content-Type: text/html;charset=utf-8");
	include("../_judge.php");
	include("../../function/function.php");
	
	$action = chkstr(trim($_REQUEST['action']));
	$webinfo_id = chkstr(trim($_REQUEST['webinfo_id']));
	$index_copy = $_REQUEST['index_copy'];
	$web_titles = $_REQUEST['web_titles'];
	$web_keywords = $_REQUEST['web_keywords'];
	$web_description = $_REQUEST['web_description'];
	$index_mk1 = $_REQUEST['index_mk1'];
	$index_mk2 = $_REQUEST['index_mk2'];
	$index_mk3 = $_REQUEST['index_mk3'];
	$index_mk4 = $_REQUEST['index_mk4'];
	$index_mk5 = $_REQUEST['index_mk5'];
	$index_mk6 = $_REQUEST['index_mk6'];
	$index_mk7 = $_REQUEST['index_mk7'];
	$index_mk8 = $_REQUEST['index_mk8'];
	
	if($action == "save"){
		if(!is_numeric($webinfo_id)){
			echo erro("ID错误");
		}
		
		// 更新数据
		$mysql = new sqlstr("kboy_webinfo"); 
		$mysql -> set("index_copy",$index_copy);
		$mysql -> set("web_titles",$web_titles);
		$mysql -> set("web_keywords",$web_keywords);
		$mysql -> set("web_description",$web_description);
		$mysql -> set("index_mk1",$index_mk1);
		$mysql -> set("index_mk2",$index_mk2);
		$mysql -> set("index_mk3",$index_mk3);
		$mysql -> set("index_mk4",$index_mk4);
		$mysql -> set("index_mk5",$index_mk5);
		$mysql -> set("index_mk6",$index_mk6);
		$mysql -> set("index_mk7",$index_mk7);
		$mysql -> set("index_mk8",$index_mk8);
		$news_sql = $mysql -> updateSql("id=$webinfo_id");
		$news_res = mysql_query($news_sql);
		if($news_res){
			echo ok("操作成功","webinfo.php");
		}else{
			echo erro("服务器内部错误");
		}
	}else{
		echo erro("参数错误");
	}
	
?>